<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>我要升级</title>
	<link rel="shortcut icon" href="https://gtms04.alicdn.com/tps/i4/TB1_oz6GVXXXXaFXpXXJDFnIXXX-64-64.ico" type="image/x-icon"/>
	<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
	<link rel="stylesheet" href="/wjfh/css/iconfont.css">
	<link rel="stylesheet" type="text/css" href="/wjfh/css/common.css"/>
	<link rel="stylesheet" type="text/css" href="/wjfh/layui/css/layui.css"/>
	<link rel="stylesheet" type="text/css" href="/wjfh/css/style.css"/>
	<script src="/wjfh/js/flexible.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="resgcontain">
	<blockquote class="layui-elem-quote">
		<span style="font-size: 0.5rem">晋升规则：</span>
	</blockquote>
	<ol class="jinsheng">
		<li>1.一次性拿货12盒，成为经销商。</li>
		<li>2.经销商两个月内累计拿货36盒，第二个月晋升为总经销商，总经销商晋升的当月，必须一次性拿货36盒，之后就不限盒数了。</li>
		<li>3.总经销商两个月内累积拿货120盒，第二个月晋升为联创，联创晋级当月，必须一次性拿货120盒，每个季度有240盒的考核。</li>
	</ol>
</div>
<div class="resgcontain">
	<div class="sjdengji">当前等级：<span id="dengjiname"></span></div>
	<div class="qrcode">
		<div id="qrcode"></div>
		<p>长按保存二维码</p>
	</div>

</div>
<div class="resgcontain">
	<!--<h2 class="shareez">每邀请一个代理出货总部会给您奖励<span>80</span>元</h2>-->
	<h2 class="shareez">欢迎开启五季芳禾健康事业！<br>
		往后余生，健康是你，富有是你……
	</h2>
	<div class="sharefoot">
		<button class="firendquanbtn openshare"><i class="icon iconfont"></i>朋友圈分享</button>
		<button class="firendbtn openshare"><i class="icon iconfont"></i>好友分享</button>
	</div>
	<div style="height: 15px;"></div>
</div>
<div class="sharemb"></div>
<script src="/wjfh/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="/wjfh/js/vue.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/wjfh/js/axios.js" type="text/javascript" charset="utf-8"></script>
<script src="/js/jquery.min.js?v=2.1.4" th:src="@{/js/jquery.min.js?v=2.1.4}"></script>
<!-- 实现网址生成二维码 -->
<script type="text/javascript" src="http://static.runoob.com/assets/qrcode/qrcode.min.js"></script>
<script>
    window.onload = function () {
        layui.use(['jquery', 'form','layer'], function() {
            $ = layui.jquery,
                form = layui.form,
                layer = layui.layer;
            var invite;
            layer.ready(function(){
                layer.load(1);
            });

            $.ajax({
                cache: true,
                type: "POST",
                url: "/goodsManager/retail/mine",

                error: function (request) {
                    layer.alert("Connection error");
                },
                success: function (data) {
                    console.log(data);
                    if (data.code == 500) {
                        parent.location.href = '/goodsManager/page/login';
                    } else {
                        invite = data.invite;
                        $("#invite").text(invite);
                        $('#dengjiname').text(data.level);
                        layer.closeAll('loading');
                        makeCode();
                    }


                }
            });
            $(".sharemb").on("click",function () {
                $(".sharemb").hide();
            })
            $(".openshare").on("click",function () {
                $(".sharemb").show();
            })

            // 二维码图片的大小
            var qrcode = new QRCode(document.getElementById("qrcode"), {
                width : 100,
                height : 100
            });

            // 根据url生成二维码
            function makeCode () {
                var elText = 'http://www.5jfh.cn/goodsManager/page/resg?code='+invite;
                $('#CopyHref').attr('data-clipboard-text',elText);
                qrcode.makeCode(elText);
            }

        })
    }
</script>
</body>
</html>
